package com.lzj.admin.service.impl;

import com.lzj.admin.service.IRbaService;
import com.lzj.admin.service.IRoleMenuService;
import com.lzj.admin.service.IUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class RbaServiceImpl implements IRbaService {

    @Resource
    private IUserRoleService userRoleService;

    @Resource
    private IRoleMenuService roleMenuService;
    /**
     * @param userName
     * @Description: 根据当前啊登陆的用户名查询角色
     * @Author: lvyuanbo
     * @Date: 2021/8/16
     */
    @Override
    public List<String> findRolesByUserName(String userName) {

        return userRoleService.findRolesByUserName(userName);
    }

    @Override
    public List<String> findAuthortiesByRoleName(List<String> roleNames) {
        return roleMenuService.findAuthortiesByRoleName(roleNames);
    }
}
